package com.cyt.website.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 官网新闻资讯管理-官网新闻资讯管理实体类
 *
 * @author congcong tao
 * @date 2019-8-13 10:00:52
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_website_news")
public class WebsiteNews implements Serializable {

	/**
     * 主键ID
     */ 
	@Id
	private String id;

	/**
     * 名称
     */ 
	@Column(name = "name")
	private String name;

	/**
     * 展示图
     */ 
	@Column(name = "photo")
	private String photo;

	/**
	 * code类型，code码
	 */
	@Column(name = "code")
	private String code;

	/**
	 * 路径
	 */
	@Column(name = "path")
	private String path;

	/**
     * 链接路径
     */ 
	@Column(name = "url")
	private String url;

	/**
     * 描述
     */ 
	@Column(name = "description")
	private String description;

	/**
     * 内容
     */ 
	@Column(name = "content")
	private String content;

	/**
     * 类型1=对内2=对外
     */ 
	@Column(name = "type")
	private String type;

	/**
     * 状态1=有效2=无效
     */ 
	@Column(name = "status")
	private String status;

	/**
     * 排序
     */ 
	@Column(name = "order_num")
	private Integer orderNum;

	/**
     * 优化键
     */ 
	@Column(name = "seo_keywords")
	private String seoKeywords;

	/**
     * 网站优化描述
     */ 
	@Column(name = "seo_description")
	private String seoDescription;

	/**
     * 是否删除：1-未删除；2-已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author congcong tao
	 * @date 2019-8-13 10:00:52
	 */
	public WebsiteNews(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}